package com.rdc.example.dao;

import com.rdc.example.entity.Song;

import java.util.List;

public interface SongDao {

    boolean insert(Song song) throws Exception;

    boolean deleteSongById(Integer id) throws Exception;

    boolean updateSong(Song song) throws Exception;

    Song getSongById(Integer id) throws Exception;

    Song getRandomSong() throws Exception;

    boolean addLike(Integer id) throws Exception;

    boolean reduceLike(Integer id) throws Exception;

    boolean addPlayCount(Integer id) throws Exception;

    boolean addColumn(Integer id, Integer columnId) throws Exception;

    boolean removeColumn(Integer id) throws Exception;

    boolean removeColumnAll(Integer columnId) throws Exception;

    List<Song> listSongByUserId(Integer userId) throws Exception;

    List<Song> getSongListByPageAndUserId(Integer userId, Integer pageNo, Integer pageSize) throws Exception;

    Integer countSongByUserId(Integer userId) throws Exception;

    List<Song> getSongListByPageAndColumnId(Integer columnId, Integer pageBegin, Integer pageSize) throws Exception;

    Integer countSongByColumnId(Integer columnId) throws Exception;

    List<Song> getSongListByPageAndColumnIdWithNull(Integer columnId, Integer userId, Integer pageBegin, Integer pageSize) throws Exception;

    Integer countSongByColumnIdWithNull(Integer columnId, Integer userId) throws Exception;

    List<Song> searchSongsByTitleAndLikeDesc(String keyword, Integer pageBegin, Integer pageSize) throws Exception;

    List<Song> searchSongsByTitleAndCreatAtDesc(String keyword, Integer pageBegin, Integer pageSize) throws Exception;

    Integer countSearchSongsByTitle(String keyword) throws Exception;

    List<Song> getSongListForReview(Integer checkId, Integer pageBegin, Integer pageSize) throws Exception;

    Integer countSongListForReview(Integer checkId) throws Exception;

    boolean startReview(Integer songId, Integer checkId) throws Exception;

    boolean passReview(Integer songId) throws Exception;

    boolean rejectReview(Integer songId, String reason) throws Exception;

    List<Song> getSongListByIdList(List<Integer> ids, Integer pageNo, Integer pageSize) throws Exception;

    List<Integer> getSongIdList() throws Exception;
}
